package com.qf.Vo;

import com.qf.exeception.EntryExeception;

public class ResultVoUtils {

    public static ResultVo success(Object data){
        ResultVo resultVo=new ResultVo(0,"成功" ,data );
        return resultVo;
    }

    public static ResultVo success(){

       return ResultVoUtils.success(null);
    }

   public static ResultVo err(EntryExeception ex){
       return new ResultVo(ex.getCode(), ex.getMsg(), null) ;
   }
   public static ResultVo err(Object data){
        return new ResultVo(5, "失败", data);
   }
}
